<!DOCTYPE html>
<%@page pageEncoding="UTF-8"%>
<html>
<head>
<title>UEditor</title>
<%@include file="/resource/component.jsp"%>
<script type="text/javascript" src="<%=rootPath%>/resource/third-party/htmleditor/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="<%=rootPath%>/resource/third-party/htmleditor/ueditor/ueditor.all.min.js"></script>
</head>
<body>
	<textarea id="myEditor" name="content" style="height:300px;">
      <p>默认值</p>
    </textarea>
    
     <div style="margin-top:10px">
        <table>
          <tr>
            <td> <a class="nui-button" onclick="setContent">设置编辑器的值</a></td>
            <td style="padding-left:5px;"><a class="nui-button" onclick="getContent">获取编辑器的值</a></td>
            <td> <a class="nui-button" onclick="setDisabled">设置编辑器只读</a></td>
            <td style="padding-left:5px;"> <a class="nui-button" onclick="setEnabled">取消编辑器只读</a></td>
          </tr>
        </table>
    </div>
<script type="text/javascript">
nui.parse();

var ue = UE.getEditor('myEditor');

function getContent() {
    var arr = ue.getContent();
    alert(arr);
};
function setContent() {
    ue.setContent('专业WebUI控件库');
};
function setDisabled() {
    ue.setDisabled('fullscreen');
};
function setEnabled() {
    ue.setEnabled();
}
</script>
</body>
</html>